package person;

import java.util.Calendar;

public class Employee extends User{

	/**
	 * se la persona non esiste
	 * @param name
	 * @param surname
	 * @param taxCode
	 * @param residence
	 * @param phoneNumber
	 * @param fax
	 * @param email
	 * @param role
	 * @param referenceCompany
	 * @param identifyCode
	 * @param birthDate
	 */
	
	public Employee(String name, String surname, String taxCode, String residence, String phoneNumber, String fax, String email, Role role, String referenceCompany, Calendar birthDate, double salary) {
		super(name, surname, taxCode, residence, phoneNumber, fax, email,birthDate);
		this.role = role;
		this.referenceCompany = referenceCompany;
		this.setBirthDate(birthDate);
		//this.assignedEvent = null;
		this.salary = salary;
	}
	public Employee(long id,String name, String surname, String taxCode, String residence, String phoneNumber, String fax, String email, Role role, String referenceCompany, Calendar birthDate, double salary) {
		super(id,name, surname, taxCode, residence, phoneNumber, fax, email);
		this.role = role;
		this.referenceCompany = referenceCompany;
		this.setBirthDate(birthDate);
		//this.assignedEvent = null;
		this.salary = salary;
	}
	/**
	 * se la persona esiste già nel sistema
	 * @param person persona che à diventata un impiegato
	 * @param role
	 * @param referenceCompany
	 * @param identifyCode
	 * @param birthDate
	 */
	public Employee(Person person, Role role, String referenceCompany, Calendar birthDate, double salary){
		super(person);
		this.role = role;
		this.referenceCompany = referenceCompany;
		this.setBirthDate(birthDate);
		//this.assignedEvent = null;
		this.salary = salary;
	}

	public Employee(long id, Person person, Role role, String referenceCompany, Calendar birthDate, double salary){
		super(id, person);
		this.role = role;
		this.referenceCompany = referenceCompany;
		this.setBirthDate(birthDate);
		//this.assignedEvent = null;
		this.salary = salary;
	}
	public Role getRole() {
		return role;
	}
	public void setRole(Role role) {
		this.role = role;
	}
	public String getReferenceCompany() {
		return referenceCompany;
	}
	public void setReferenceCompany(String referenceCompany) {
		this.referenceCompany = referenceCompany;
	}
	public String getIdentifyCode() {
		return this.getId()+"";
	}
	/*
	public Event getAssignedEvent() {
		return assignedEvent;
	}
	public void setAssignedEvent(Event assignedEvent) {
		this.assignedEvent = assignedEvent;
	}
	*/
	public double getSalary() {
		return salary;
	}
	public void setSalary(double salary) {
		this.salary = salary;
	}
	public enum Role{
	RAPRESENTANT,
	HUMAN_RESOURCES_RESPONSABLE,
	EVENT_RESPONSABLE,
	FINANTIAL_RESPONSABLE,
	WAREHOUSE_RESPONSABLE,
	ARTIST, 
	MAITRE, 
	OTHER_EMPLOYEE,}
	private Role role;
	private String referenceCompany;
	//private Event assignedEvent;
	private double salary;
}
